<script>
    function abc() {
        var name = document.getElementById('search_key');
        name.className = "ipt12";
    }
    function edf() {
        var name = document.getElementById('pl_key');
        name.className = "ipt33";
    }
    function cc(x) {
        var name = document.getElementById("con_five_" + x);
        var list = document.getElementById("five" + x);
        name.style.display = "none";
        list.className = "";
    }
    function setTab(name, cursel, n) {
        for (i = 1; i <= n; i++) {
            var menu = document.getElementById(name + i);
            var con = document.getElementById("con_" + name + "_" + i);
            menu.className = i == cursel ? "hover" : "";
            con.style.display = i == cursel ? "block" : "none";
        }
    }
</script>
<script type="text/javascript" src="/js/flowplayer-3.2.4.min.js"></script>
<script type="text/javascript" src="/js/flowplayer.playlist-3.0.8.js"></script>
<script type="text/javascript" src="/js/jquery.tools.min.js"></script>
<link rel="stylesheet" type="text/css" href="/css/playlist.css"/>
<!--402页面-->
<div class="main">
    <div class="left">
        <?php @include_component("system","menuNavigator",array("catalogId"=>$video->getCatalogId(),"subCatalogId"=>$video->getSubCatalogId(),"type"=>2,"cssStr"=>"address_tit address_tit301"));?>
        <div class="vod_top">
            <div class='vod_flash'>
            <h2><?php echo $video->getTitle() ; ?></h2>
            <h3>来源：<span><?php echo $row_array["source"]; ?></span> 演艺：<span><?php echo $row_array["artist"]; ?></span> 时间：<span><?php echo $row_array["currentTime"]; ?></span> Tag：<span><?php echo $row_array["tag"]; ?></span> 点击：<span><?php echo ($row_array["hit_mask_i"] + $row_array["hit_i"]); ?></span></h3>
                <a href="<?php echo $video->getLink(); ?>" style='display:block;width:635px;height:450px'
                   id='player' class='player'>
                </a>
                <div class="detail_text" id="divBody"><?php echo trim($video->getBrief())=='(如果不另行输入，默认为文章前100字)' ? '' : trim($video->getBrief()); ?></div>
            </div>
            <!--PlayList-->
            <div id="playlist_wrap">
                <a class="prev"></a>

                <div class="sp_list" id="playlist">
                    <div class="entries">
                        <div class="page">
                        <?php
                                                $idx = 1;
                        foreach ($group_videos as $group_video) {
                            ?>
                                <a href="<?php echo $group_video->getLink(); ?>">
                                   <BR /><img src="<?php echo $group_video->getSnapshotBig(); ?>" width="100" />
                                </a>
                            <?php
                            if ($idx++ % 4 == 0) {
                                echo "</div>";
                                echo "<div class='page'>";
                            }
                        }


                        if (count($group_videos) == 0) {
                            ?>

                                <a href="<?php echo $video->getLink(); ?>">
                                    <img src="<?php echo $video->getSnapshotBig(); ?>" width=100 height="70"/>
                                </a>

                            <?php } ?>
                        </div>
                    </div>
                </div>
                <a class="next"></a>
            </div>
        </div>
    <?php //debug
//    echo "group id:" . $this->video->getVideoGroup()->getVideoGroupId();
//    echo count($group_videos);
    ?>
        <script>
            //flowplayer('player', '/js/flowplayer-3.2.5.swf');
            //            $f('player','/js/flowplayer-3.2.5.swf').playlist('#sp_list')
            $(function() {
                $("#playlist").scrollable({ circular: true });
                $f("player", {src: "/js/flowplayer-3.2.5.swf", wmode: 'opaque'}, {
                    plugins: {
                        pseudo: { url: '/js/flowplayer.pseudostreaming-3.2.5.swf' }
                    },
                    clip:{
                        provider: 'pseudo'
                    }
                }).playlist("div.entries", {loop:true});
            });
        </script>
        <!--视频播放结束-->
    <?php
        @include_component('video', 'related', array('recordCount' => 5, 'contentId' => $videoId, 'contentTypeId' => 1001)); //相关视频
    ?>

        <!--特别推荐结束-->
    <?php
        @include_component("user", "comment", array("recordCount" => 4, "contentId" => $videoId, "contentTypeId" => 1001));
    ?>
        <!--留言评论结束-->

    </div>
    <!--左侧结束 右侧开始-->

    <div class="right">
    <?php
                                           @include_component('other', 'advertise');//广告
    @include_component('celebrity', 'related', array('keyword' => urlencode($video->getTag())));//明星首页列表
    @include_component('video', 'latest');//最新视频
    @include_component('video', 'recommend', array('recordCount' => '5', 'catalogId' => $catalogId, 'layout' => '2'));//推荐视频
    @include_component('news', 'recommend', array('recordCount' => 5));//新闻推荐
    //@include_component('video', 'recommend', array('recordCount' => '5', 'catalogId' => $catalogId, 'layout' => '3'));//视频推荐
    @include_component('album', 'recommend2');//美图下载
    ?>

    </div>
